Evidently my reply on your Windsor post hasn't deterred you from attempting to visit Windsor during your layover!
There are two considerations regarding a taxi from Heathrow. Taxi's are abundant at the airport and you can simply walk out of the terminal and pick one up straight away however you will be paying for the convenience, quite significantly.
Yes you can pre-book a minicab to collect you, just make sure that there are no waiting charges as you have no idea of potential delays. Most minicab drivers will wait on the outskirts of the airport and will monitor your flight's progress online, they will then make an educated guess as to when you are likely to pass through customs.
You may consider asking the driver to wait and return you to the airport as there's every chance that it'll be an almost instant turnaround! ; )