A constrained approximation problem arising in parameter identification