Painful BMs?

Bailey

My little guy is a month old this week. He is breastfed and was having no problems until this week. it seems like he's having painful bowel movements. I think he may be constipated? He was having a dirty diaper at least 5 times a day prior to this week and now he wakes up with just a wet diaper, which never happened before. He grunts and turns red when he tries to pass a bm, but just whimpers and cries and nothing comes out. occasionally when he's able to pass gas, he'll have a dirty diaper. any idea what could be going on or what I should do??