Pulse family optimization for parametrized quantum gates using spectral clustering