Optimal Replication of Contingent Claims Under Portfolio Constraints