Optical Detection of Ions Confined in a rf Quadrupole Trap