Has he been doing this all his life - where he will go outside of the box every couple of weeks? If he's healthy, and it's behavioural - I'm wondering if you changed something in the house - changed a routine or something? Have you changed the litter recently?
My cat also hates the outdoor cats he sees by the house (i.e. the black cat I call his "one eyebrowed baby") - he'll growl and scratch at the window, but that's about as far as it goes.
You can try to praise him (and maybe give him a healthy treat) everytime you catch him successfully using the litter box. Dutifully cleaning up the spots he uses outside the box will help. Here's some more tips for you:
http://www.catinfo.org/litterbox.htm
Good luck - sounds like you've got a challenge on your hands!