Well, first he would stop time and ponder why a world-famous cancer doctor is sleeping on train tracks! :D
Seriously, though, I'm not sure this is an answerable variable. Remember we are dealing with an absolute hypothetical; the train driver has no other choices other than to kill the one or the five. If he is close enough to recognize the doctor... well, he's already committed to that path. He might feel tremendous guilt over the accidental death, but at that point there is still no decision he can make that would change things.
So let's say, all things being equal, that the train is slow enough for him to be heading around the curve, see the fork, and assess the situation. He can see the five homeless people on one side, and the cancer doctor on the other -- the cancer doctor famously wears a bright yellow raincoat everywhere, with the bio-hazard symbol on it. Our driver thinks thusly:
"I can kill the doctor, who might or might not cure cancer, therefore saving millions of lives, or I can kill the five homeless, who may not do anything important in the future but who by themselves are a net gain of four lives at the immediate moment. Other doctors can continue his work, but no one will ever bring back those four other people."
The dilemma therefore is the same. If he is acting by pure utilitarian standards, he will stay on his track and kill the doctor, saving five lives immediately. Of course, considering that he will be investigated for negligence and probably lose his job and livelihood, he might consider jumping off the train himself.