I ran into the same thing: Cat pooped in exotic, awkward places, but never the litter box. Never looked like she was in pain -- just being stubborn, I figured. Turned out to be a bladder stone brought on by the ingredients in modern cat food (put in place to help other feline health issues, but which causes stones in a small subset of cats). After the stones were cleared up, all litter box issues disappeared.
My cats don't like the uber-expensive clot-forming synthetic crystal litter, and don't like various types of alternatives either - almost none from this list: http://www.petco.com/Shop/ShoppingGuides/petco_ChooseCatLitt... )
..but they do love some simple pebbles, which are, fortunately, dirt-cheap (or pebble-cheap :) ) although a little messier to clean than the above alternatives. I think they'd like sand as well (I live in Uruguay and those pebbles are from Argentina, so I don't know what alternatives are in the U.S.).
So in the utility room I used for the litter boxes, I replaced the carpet with some cheap engineered wood flooring (Pergo or some similar knockoff brand). Problem went away. I think it is very weird/uncomfortable for them to go on a smooth hard surface, and carpet is a rougher surface that sort of could feel like dirt or grass.
If there's a regular spot where he goes, maybe try putting a box on that exact spot. We had a similar problem a few months ago, where our cat was peeing in the basement on a stack of paper he found. We moved everything away from that spot and put a box there and now he's happy as a clam.