Can a class 1 medical certificate be obtained when glasses are needed to achieve 20/20?
Yes, you can (provided you don't have any other disqualifying conditions).

14 CFR 67.103 Eye


  (a) Distant visual acuity of 20/20 or better in each eye separately, with or without corrective lenses. If corrective lenses (spectacles or contact lenses) are necessary for 20/20 vision, the person may be eligible only on the condition that corrective lenses are worn while exercising the privileges of an airman certificate.
  
  (b) Near vision of 20/40 or better, Snellen equivalent, at 16 inches in each eye separately, with or without corrective lenses. If age 50 or older, near vision of 20/40 or better, Snellen equivalent, at both 16 inches and 32 inches in each eye separately, with or without corrective lenses.


In your case, you will have a limitation placed on your certificate that says that you must wear corrective lenses while performing the duties under your Class-1 medical certificate.