Bistable laser diode for optical signal processing