Mode distribution in coherently amplifying random media