Which device amplifies the optical signal in fiber optics?
An optical amplifier is essentially an underdriven laser. To make an inexact electronics analogy, think of how you make an oscillator. You create a circuit with gain and feed the output back to the input. To make an amplifier, you create a circuit with gain and don't use any feedback. (please note that any negative feedback you use within your gain circuit is an implementation detail - think "black box" amplifier).

A laser is an oscillator operating at lightwave frequencies. It has a gain medium and mirrors at each end so that the light coming out of the gain medium is reflected back into it - this is the feedback. One of the mirrors is very slightly degraded so that it lets out a small fraction of the light.

An optical amplifier is the same thing, without the mirrors. A light signal goes into a gain medium, is reinforced by energy from the power supply, and is emitted out the other side as an amplified signal.

The most common type is the erbium-doped fibre amplifier. Erbium ions are excited to a high potential by a pump laser. When an excited ion is hit by an incoming signal photon, it emits a matching photon - therefore two signal photons leave the device. That's optical gain, so it can be used as an optical amplifier.

The details of how the amplifiers work is quite complicated but that's the short version.