Maybe he's just upset he's home alone? Sometimes they are quite fussy when they don't get what they want. Have you tried taking him on long, long walks to let him poop? Or if you can somehow associate pooping outside with some kind of treat or reward with him, he may learn that way. Good luck, if he knows how to pee in the right place, pooping can't be too far away!