All-optical coding of mode-locked semiconductor laser pulse trains for high bit rate optical communications