When is it OK to cook a burger medium?
Beef has a firm, closed texture, which prevents bacteria penetrating far into the meat. This is why it's relatively safe to eat a rare steak: you kill the surface bacteria by searing it, and the middle is relatively bacteria free.

When you grind beef, you of course mix the surface with the middle, which increases the risk. To be safe, you should therefore limit the surface-to-middle ratio, ie use as few separate pieces of beef as possible.

Your average supermarket pack of mince may have any number of pieces thrown together, and so it's not a good idea to make a medium burger with it. The safest option is to grind your own beef, ensuring your equipment is very clean and your meat has been handled properly throughout its lifetime. I believe at least one UK gourmet burger chain grinds their own meat fresh daily. 

The other option is to use irradiated beef, which is virtually sterilised by being exposed to a burst of radiation. I'm not sure how easy that is to find in the UK, however.