his digestive system may not be developed to digest the milk completely. this may be lactose intolerence. Get a pediatrician's opinion for the same.
As for the cries while trying to push the stools, apply lignocaine jelly around the anus or him in a sitting position in a tub filled with warm water. This will give a soothing sense and his motions will pass without pain.
A pediatric surgeon should be consulted to find if your son has an anal fissure
which is nothing but a tear at the anal wall due to passage of hard stools.
wish you good health