Of course they can. Romney certainly has. Just one example: the LDS Church is the fiercest defender of the Boy Scouts from the infiltration of gay activism. Romney stated very publicly that he was of a different mindset.
Now, it is true that LDS members who are social liberals tend to fall into inactivity with respect to their church affiliation. There is no shortage of such LDS members in Utah. Salt Lake mayor Rocky Anderson is a prime example.
But when the prophet of the LDS Church takes a solid stance on something political, the members have to obey (regardless of their politics).
It's not like the Catholic Church were you kindda obey what you like and disregard what you don't like.
If the Mormon prophet tells you his stance on a political issue (the Boy Scouts not being a good example), you have to obey. You cannot be pro-choice and Mormon. You cannot be pro-gay marriage and Mormon.
It would only take one question to kill any Mormon's chances of being president: If the prophet of your church ordered you to attack the Ayatollah in Iran, would you do it? Either way, he risks alienating someone (his Mormon base or the born-again base). I'm not saying this has to be the exact question, but you get the point.
Like, I said, people don't like the idea of someone running the scene from backstage.
I'm not saying the Mormon prophet would do this. I'm just saying it would appear that way and thus take away any chance for Romney.