Sounds like he may have some sort of intestinal parasite like Coccidia or Giardia---both these make foul-smelling poos. When you take him in to vet to be checked out bring a fresh stool sample with you for the vet to test. Hope you soon are able to find out what the problem is.
"We humans are indeed fortunate if we happen to be chosen to be owned by a cat." -- Anonymous