Modulating the Er:YAG laser