Your maxim seems overly simplistic. I don't see the connection between how well you execute something and how it jibes with your ethical convictions.
I can think of a few things that were done well, but for which the perpetrators ought not be proud. Consider the Banco Central burglary (http://en.wikipedia.org/wiki/Banco_Central_robbery_at_Fortal...). Beautifully executed, but the burglars' selfishness cost the people of Brazil a fortune.
In the extreme, consider Hitler, who was tremendously efficient at terminating Jews under the Third Reich. Should that efficiency exonerate him from any shame?
My examples are ridiculous, but I'm only trying to make the point that how you feel ethically about your work is a function of what that work is, not a function of how well you perform it.
Just do good work, then.