I'm so sorry this hasn't been answered! In general, canned pumpkin would be fine but not all dogs like that! You can try a bland diet like small amounts of boiled chicken and rice and gradually wean in his normal dog food as the diarrhea resolves. If it continues for more than a few days, or if he becomes lethargic or the diarrhea becomes bloody, seek a vet immediately!
I happened to see this has not been answered to and while I'm no vet, I feed my dog a little, say1/4 cup, of canned pumpkin a day and he hasn't had diarrhea since I started doing that.