It sounds like it could be anal fissures if the poops are big and hard to pass. Try increasing the fiber and see if that helps. If this continues you should probably talk to a healthcare provider, but my guess is it's anal fissures. The dairy could be contributing to the shape of the large, ball-shaped poops even if he doesn't have an actual problem with dairy as far as allergies go. You don't want to let him produce the large, hard poops too often, as it can stretch out the colon and rectum and cause other problems. I think that increasing fiber will work really well-- blueberries are great for this, and maybe even slip some prune juice in with his regular juice. My oldest had a problem with constipation/big poops and she said that the prune juice tasted like raisens! LOL! It mixes in well with fruit punch.
7yo: "Mom,I know which man is on a quarter and which on is on a nickel. They both have ponytails, but one man has a collar and the other man is naked. The naked man was our first president."