You can. But you can't endorse candidates while a 501(c)(3) non-profit organization.
If you don't like it, renounce the tax status of your church or reincorporate under a different tax status so you can say whatever you please. It's a pretty simple solution.
What about outfits like Planned Parenthood or ACORN that are purely political but their nonprofit tax status remains unchallenged?
Does anyone know what the churches should file under that gives them and their donors exemption from tax and allows political speech without violating IRS rules?
and besides-there is enough to preach about without even going near politics. Church/pastors should teach and guide and instruct on how to live a life pleasing to God. The other should just be common sense.