Try diluted apple juice, or some sugar water, or tell your pediatrician, my niece had the same issue and he prescribed her baby laxative
Try rubbing his belly and pulling his legs up and down to help get his bowles moving and it will relieve any Gass he might have
I was told by doctor its normal for them to get constipated and to give my little one an extra ounce of water in one of his formula bottles for example it says to put one scoop of formula for every 2oz of water so she said to put one scoop formula for 3oz of water once a day.. my little one was constipated a week ago we bought him the baby Gerber apple prune juice and gave him half an oz diluted in water it seemed to work
I was told some babies can go up to a week without pooping and not to freak out. Keep trying what your doc said. Good luck