Optimal parameter estimation of shaped phase objects