If your cold sore is especially painful or irritating, your doctor may prescribe an anesthetic gel to alleviate pain or an antiviral oral medication to speed healing or prevent recurrence. The antiviral medicines available for treatment include acyclovir (Zovirax), famciclovir (Famvir), and valacyclovir (Valtrex).