Generalized low-density parity-check codes for optical communication systems