I don't know if this will help at all, but my son is interested in locking and unlocking doors (or anything with locks). You could try taking something with you to see if it keeps him occupied. It could be something simple like a box safe with doors or a lid he can lock and unlock. You could put a few bits and pieces inside it that you think he would like, and leave him to it. It probably isn't OCD it is more likely a rigid repetitive behaviour associated with autism.
Have you also looked at Irlen Syndrome. This is a visual perceptual disorder that affects alot of people with dyslexia and autism. It can be remedied just by wearing tinted glasses. You can google Irlen Syndrome to see what it is about. Whether that would help or not would depend on what the cause of the door obsession is. Is it something about the door itself, or is it about the way the door looks or the depth difference of looking through a door.
Thank you Sally, I will look into this and make an appt with an eye specialist.
The only other visual thing I can think of is to have his binocular vision checked. My son didn't have binocular vision and this means that at close up they are either seeing double or their brain only records visual information through one eye which can lead to depth perception problems.
It depends on how co-operative your son is, but you can go to your GP and ask for a referal to the childrens hospital for his binocular vision to be tested.
Regarding social outings out. Have you joined a parent support group? Alot of them met in secure places and it gives them and their children a chance to socialise without the constant worry or where are they and what are they doing.