Alphagan P is a glaucoma eye drop medication that has a side effect of reducing the size of the naturally dilated pupil. It is not a permanent reduction and commonly dissipates within 4-8 hours. The common dosage of Alphagan P for pupil size purpose is less than dosage for glaucoma purposes. Unless the use of Alphagan P causes an unusual intraocular pressure (IOP) change, it is considered safe to use off-label for pupil size reduction.
Pilocarpine also reduces pupil size, but it is much harder on the eyes, can lead to headaches and similar problems, is not wise for continued use, and is also temporary. To my knowledge there is not safe method to induce smaller pupils permanently with pharmaceuticals.
Contact lenses with an artificial iris can reduce pupil size and prosthetic iris can be surgically implanted, but a surgical implant would be a radical method to reduce pupil size for refractive surgery purposes.