Variable optical attenuator with tunable nonsmooth curved mirror