Toddler constipated


So basically my 20month old son has been constipated for two weeks, We went doctors a week ago and they gave him lactulose and his been on that for a week now and it hasn't helped, hes in pain and some the time hes down on the floor screaming, I've changed his diet to try and help but nothing, I dont no what to do and cant stand seeing my son in pain, I've actually had to put my finger up there to pull some poo that's got stuck it's been that bad, any advice would be great.