This persistent question is often known as the problem of "dirty hands" (from Sartre). First, this question excludes actions by political leaders which are merely aimed at benefiting the politician him/herself at the expense of the governed or the common good. This sort of self-serving corruption and is both morally and legally wrong.
Although Socrates alludes to the dirty handed feature of politics in the Apology, its first clear presentation is by Machiavelli (1513), who advises that the Prince "must learn how not to be good" in order to protect the state and keep it intact. Doing what is best for the people often requires doing that which violates principles of private or conventional morality, such as truth-telling or promise-keeping.
Two examples: In 483 BC, Themistocles, the Athenian politician and general saw the need for a stronger navy to protect Athens against the Persian empire. Unable to convince the democratic assembly, he lied and told the assembly that there was a threat to merchant ships from the small nearby island of Aegina. Political opinion then swung in favor of a stronger navy which did later show itself to be decisive in protecting Athens from the Persians. After election for a second term in 1864, US President Lincoln believed, with good reason, that unless the 13th Amendment to the Constitution (abolishing slavery) was proposed by the lame duck Congress during what was left of his first term, it would be unlikely to be proposed at all. With Lincoln's support, his political operatives bribed certain outgoing members of Congress with public positions, such as postmasterships, in exchange for their votes to propose the13th A. It was proposed by Congress and then ratified by the states.
The claim is that what is the right action for a political leader to take in pursuing the common good may often conflict with conventional or private morality. My question above is intended to allow reasoned arguments to be presented about the correctness or incorrectness of that claim. There are two related questions. First, if the claim is correct, what sort of moral responsibility, if any, does a dirty handed politician taking actions that are right politically, but at the same time, violate conventional morality bear for those actions? Second, if there is moral responsibility to be borne by political actors, then to what degree, if any, do the people in a direct or representative democracy, share in that moral responsibility?