I've done this plenty of times now, with mixed success. The longest running attempt was a gestalt PC in a gestalt game that went from level 3-10. No one ever seemed to think it was unfair or I was favoring my PC. I actually went out of my way to target him more often than his fair share just to be absolutely sure I wasn't favoring him...
That PC was a gestalt cleric // (homebrew version in sig) Ninja, so he was the party healer and also the scout sometimes. As long as you have the DMPC fill the less glamorous roles -- healer, buffer, utility caster, tank/meatshield, possibly even debuffer/battlefield controler if he's not single handedly "winning" the fights. But avoid the roles like blaster, archer, ...what my friends call the "beat stick" but most would probably call DPS, and so forth. Anything that's job it is to dish out lots of offense, avoid attracting attacks, or in need of constant protection is not a good DMPC.
As for metagame knowledge, you just have to be very careful to always ask yourself "would it be reasonable for my PC to know this?", "does he have enough clues and smarts to deduce x...?" , and so forth. Also, I make it clear to the other players, that for any skill check that one of them also has, I will generally NEVER roll for the DMPC until after they try first. For example, if my PC and another's both have knowledge arcana, I give him first crack at identifying the dragon, and only if he fails or doesn't reveal as much info as my PC possibly could do I then try. In general, I try to play the DMPC more subdued and laid back. He doesn't often suggest things, he lets the other PCs do it. He'll just follow along, and if the others miss something that he could reasonably notice or think of, only then will I have him take the initiative, rolling an int, knowledge, or other appropriate check if necessary.