Machine for optical control of plastic parts