tentram, without trying to sound like a smartass I think it is quite obvious why OP would like to know how to restrict his pupils... Friends, family, work etc I know my dilated pupils from whenever I would use stimulants was obvious to people who looked twice and its annoying as fucking shit.
Crimpjiggler, sunlight works wonders at dilating pupils just dont look directly into it, being outside in sunlight would cause my stimulant pupils to constrict perfectly. I can't think of any substance though, mabe as tentram said low dose of opiates but probably isn't the best thing to use.
Alternatively, avoid using direct eye contact but not to the point where it is but obvious your hiding your eyes and try keep your eyes in light conditions if your inside. Use sunglasses if you can!
OR... My fave excuse, "must be the medication I am on?" No one has the right to blattatly accuse you of substance abuse because of large pupils, maybe unless they are MDMA style saucered and your rubbing yourself lmao, especially if you replied to them it is a medication you take.