Optical doping of silicon with erbium by ion implantation