Both laser diodes and LEDs (light-emitting diodes) are used for this purpose, but the laser diode generates a smaller beam that is easier to couple with the smaller core of singlemode fibers.
In addition to the optical considerations common with all semiconductors, diode laser structures must also incorporate a means of injecting an electrical current into the active region.
Cheap diode laser cutters and engravers operate in the visible part of the spectrum, but when you get into more powerful carbon dioxide lasers such as the one used in the popular K40 machines ...
Tunable diode laser absorption spectroscopy (TDLAS ... creating an absorption line in the spectrum. The gas concentration can be determined by assessing how much laser light is absorbed at ...