What can I do to reduce the pain I have that is on top of my ears due to new glasses?

Adjust them. Try having a licensed optician adjust them first. Also there are pads that can be placed on the temples to make them more comfortable.
Get a different pair. The discomfort you are feeling is due to glasses that are either too heavy or too snug. Be sure to test other glasses and find ones that feel comfortable after at least 5-10 minutes of wear in the doctor's office before purchasing them. You may be able to exchange your glasses for a new pair; ask the doctor who sold them to you.