Theory of slow-light semiconductor optical amplifiers