Hi, pumpkin is used to harden the stool so I wouldn't give your pup any of that as it is a fiber. You can use a warm wash cloth & wipe the butt area well and trim hair around it. Has he had his anal glads expressed lately if not you may want to have it done. Also I would exercise him a little more. You may want to get a puppy food with less fiber in it.
We do feed our pups Royal and have never had this problem with it. Also try putting water in it so he is getting more water intake.
Hope this helps