Intentionally framing someone else, even the Joker, without their expressed consent, would be a compromise of his moral code and integrity. Batman willingly accepted the penalties for the Two-Face killings. Had they framed Joker, then they would have betrayed everything that they fought to keep.
If they were concerned with the most effective means to resolve the situation, then yes, they might have framed Joker. If they believed the ends justify the means, any means, then Batman would have ran over the Joker, let him fall, or even just snapped his neck or shot him. But both Batman and Gordon were also concerned with holding onto their integrity through it. Integrity cannot be taken, only given. They paid a high price for it, between them Rachel Dawe's life, Harvey Dent's friendship (and eventually his life), Commissioner Loeb's life among others, and Batman his reputation and Gordon's partnership.
Just compare Bruce Wayne and Harvey Dent at the end of the film as Batman and Two Face. Both suffered the same tragedy (Rachel's death) and respond in very different ways. Harvey Dent gave away his integrity, while Bruce Wayne refused to allow the Joker to take his away. In the end, Batman has his integrity but sacrifices his reputation while Harvey Dent sacrificed his integrity but keeps his reputation.
Framing another person completely changes the meaning of the ending entirely, one where Joker won.