The problem here is simply that the UK populous is mainly white, so having the Doctor be white makes sense from a marketing standpoint.
I'm not racist, but history is, and having a black or asian doctor would completely expel the Doctor from anything historical.
I mean, even going back to the 1960's in the US, if the Doctor was black nobody would listen to him, and going any further back than the 19th century he could well get enslaved or something else very racially insensitive, which is water the BBC probably don't want to get into.
As for a female doctor, while I personally have nothing against it, it would require a great deal of role reversal and preparation, with the companion being male instead of female and such.
So in closing, it isn't racism or sexism for the Doctor always being cast as a white male, its because
A) So many historical settings and periods would be neglected because of historical sexism and racism,
B) The format of the show would be shaken up too drastically
C) Diversity for diversity's sake doesn't apply to The Doctor, hell we've only had 1 black companion so far, which is surprisingly accurate as a representative of the small black minority in the UK (~30 something companions, and around 3.5% black populous in UK = ~1 or 2 black companions)
D) Moffat is not very good at writing strong females unless they're some variation of River Song.
Nothing personal, its just that if the show was to have a female Doctor, he wouldn't be my pick for showrunner at the time.