I use to encounter this problem. You just have to find the right
helmet/specs.
Generally, I hold on to the sides of the helmet and apply some
outward pressure by pulling on the straps before sliding the helmet
over my head.
Seems to work well but really, there are many variables such as the
shaope of your head, the helmet, your specs, etc.
If you are wearing a full face helmet, then you just have to slide
your specs in after you have worn your helmet. After a while you
will find it almost 2nd nature and it would not bother you. This
method might work for open-faced helmets too. So try it.
Of course, the simplest way to avoid these difficulties is to wear
contact lens.