A method (702, 802, 902, 1002, 1202) for transmitting data over an optical communication path, the method comprising: receiving a bitstream for transmission over the optical communication path; determining a first sequence of bits in the bitstream that comprise a plurality of consecutive same first values; packetizing the first sequence of bits into a plurality of transmission packets by maximizing a number of bits assignable to each packet while still having a corresponding transmission power for each packet that is not greater than a threshold transmission power, the corresponding transmission power of each particular packet determined by applying a mapping of a number of bits in each packet, the mapping comprising a plurality of packet sizes and corresponding power levels, wherein the mapping increases the corresponding transmission power as the number of bits in a respective packet increase; determining that a first packet of one of the plurality of transmission packets is transmitting at a first power level corresponding to the threshold transmission power and that a second packet of one of the plurality of transmission packets is transmitting at a second power level that is less than the threshold transmission power; moving a bit from the first packet to the second packet such that the first power level of the first packet, as determined by the mapping, is lowered and the second power level of the second packet, as determined by the mapping, is raised such that both the first and second power levels are below the threshold transmission power; selectively activating a light source at the first power level according to a modulation scheme to optically transmit an entirety of the first packet by transmitting a single bit of the plurality of consecutive same first value at the lowered first power level; and selectively activating the light source at the raised second power level according to the modulation scheme to optically transmit an entirety of the packet by transmitting a single bit of the plurality of consecutive same first value at the second power level. receiving a bitstream for transmission over the optical communication path; determining a first sequence of bits in the bitstream that comprise a plurality of consecutive same first values; packetizing the first sequence of bits into a plurality of transmission packets by maximizing a number of bits assignable to each packet while still having a corresponding transmission power for each packet that is not greater than a threshold transmission power, the corresponding transmission power of each particular packet determined by applying a mapping of a number of bits in each packet, the mapping comprising a plurality of packet sizes and corresponding power levels, wherein the mapping increases the corresponding transmission power as the number of bits in a respective packet increase; determining that a first packet of one of the plurality of transmission packets is transmitting at a first power level corresponding to the threshold transmission power and that a second packet of one of the plurality of transmission packets is transmitting at a second power level that is less than the threshold transmission power; moving a bit from the first packet to the second packet such that the first power level of the first packet, as determined by the mapping, is lowered and the second power level of the second packet, as determined by the mapping, is raised such that both the first and second power levels are below the threshold transmission power; selectively activating a light source at the first power level according to a modulation scheme to optically transmit an entirety of the first packet by transmitting a single bit of the plurality of consecutive same first value at the lowered first power level; and selectively activating the light source at the raised second power level according to the modulation scheme to optically transmit an entirety of the packet by transmitting a single bit of the plurality of consecutive same first value at the second power level.