I'm pretty sure there are 3 paths; the cop-out, defeating the Doctor, and defeating Ballos in the hidden level near the end.
It's been a while since I played, can't remember if there's supposed to be a 3rd ending, but I've done the other 2 once each.