Quantum well shape tailoring via inverse spectral theory: Optimization of nonlinear optical rectification