http://www.bbc.co.uk/contact
Though really... this is probably a wasted effort. Even if they give you permission verbally (which they won't), that is not something I would put any stock in.
Best case scenario is they will send you some kind of contract or legal agreement that you'll have to sign -- and I wouldn't recommend signing anything without going over it with a lawyer.
In addition to probably wanting financial compensation, they might also have some rules about things you can/can't put in the game. And/or things you have to put in the game. Etc.
This might not even be due to them being picky... it might be due to them being bound by contracts of their own.
And really... this is why the answer will be "no". To figure all this out would take them time and effort.... they'd actually have to spend money on doing all this. It's easier and simpler to just flat out say "no" to people.
Basically what I'm getting at is that doing this 'legally' is going to involve tons of red tape and simply isn't worth it for an indy game project.
Personally... I'd do one of two things.
1) Forget about contacting the BBC and just make the game without their permission. Though I wouldn't try to sell it if you do this. Odds are they're not going to care about some stupid freeware fan game. In fact, there probably are a bunch in existence already.
2) Don't use Doctor Who. Make the same game with the same ideas... just don't use any copyrighted material.