Spectral engineering of entangled two-photon states