How long can I wait with eye pain to see if it goes away without seeing a doctor?

Depends. If the eyes are not red, and the vision is good, and there is no evidence of infection, and you have not overworn your contact lenses, you can wait a couple of days. If you have any of these symptoms you should see your eye doctor soon.