Yes a male doctor can examine a female patient alone in the room including genital examines.
But you can opt out of having a male doctor examine you if you feel uncomfortable by a male doctor examining your female body.
There's always the option of changing to a female doctor if one is available.
Most male doctors are very professional and will only do the examination as required and I've had many male doctors examine me including my private parts and never had any problem.