We'll assume you're a good person with a well-formed conscience, and so are opposed to all immoral policies a candidate advocates. That means your vote for him would constitute only material cooperation in his advocacy.
Would it be immediate cooperation, and therefore immoral per se, or mediate cooperation, and therefore potentially licit?
If it be immediate cooperation, the object of your vote cannot be distinguished from the object of the candidate's advocacy (assuming he wins). I'm inclined to think the object of voting can be distinguished from the object of enacting a particular policy of an elected official, particularly if the enactment of the policy is not morally certain to follow his election. Though voting isn't perfectly fungible -- a vote has an objective meaning independent of what the voter says it means -- I think the distinction between "having this person hold this office" and "having this person as office-holder enact these policies" is sufficient that voting for a candidate is mediate cooperation in whatever policies the candidate (if he wins) enacts.
(This is more of an assertion than an argument, as Zippy will probably have noticed, but that's what I got today.)