Of course "Can you tell me when you last saw him?" is much better, but since the question was a little different...
I considered the two sentences this way:
1) Can you tell me when was the last time you saw him? - Yesterday, Monday, etc. was the last time I saw him.
2) Can you tell me when the last time you saw him was? - The last time I saw him was yesterday, Monday, etc.
"When" could be considered the subject. That's why I thought both could be ok. Having said that, I think the first is much better.
So I think this is different from "Can you tell me who that person over there is?", where "that person" is clearly the subject.