Optimization of optical transmission capacity