It sounds like either a yeast infection (thrush) or canker sores.
There's a mouthwash that the doctor can order at the pharmacy for the pain it's called Miracle Mouthwash..it contains lidocaine, Milk of Magnesium and anther ingredient (I forget which one it is), you would swish this in your mouth and either swallow it or spit it out.
It helps coat and numb the areas that the sores are in.
If it is thrush you need to get nystatin, it's a purple medication used for thrush.