There's no 'I' in team as the saying goes, you were absolutley right to implement the most efficient method of development but if you worked for me I would have liked you to take 5 and sit down with the original developer. If you really had the best solution, I'm sure the guy (or gal) would have said, yeah you're right, good call.
Imagine if you'd changed the code and what you'd done had upset something else in the code (as I said I can't comment on this specific case) which in turn introduced a problem further down the road. You said yourself the code worked but was in-efficient, are you the team leader? Is it your call to run the risk of throwing the project deadline? Perhaps you could have left the code in but made a note to bring up at the next project meeting.
It's quite difficult to get out of the lone ranger frame of mind.
You could always submit his code to
www.thedailywtf.co.uk and let him regret it himself