When you use は between a noun and a verb, は tells you who or what is doing the thing. When you use the particle を instead then it tells to what (or who) the verb is done.
Please not that when を is used as an particle (as in this case) it is pronounced like an お.
So
「ゆうめいな いしゃ は みました」= “The famous doctor saw.”
Because the は particle tells you who is doing the action.
「ゆうめいな いしゃ を みました」= “I saw the famous doctor”
Because the を particle tells you what the action was done to.
If it isn’t obvious who is doing the action you can use は to tell it was you.
「わたし は ゆうめいな いしゃ を みました」= “I saw the famous doctor.”
Japanese prefer not to tell who is doing things if it is obvious from context.
Another example of the difference between は and を.
「すし を たべます」= “I will eat sushi”
「すし は たべます」= “Sushi will eat” This don’t make sense because sushi can’t eat.
Any questions?