What causes your pupils to be small when on opiates?

Constriction. The "pathway" leading to constriction of the circular sphincter pupillae muscle starts at a nucleus near the 3rd cranial nerve, connects inside the ciliary ganglion, and ends in the inner muscle surrounding the iris. Opiates increase parasympathetic outflow and, therefore, may produce ciliary muscle constriction.