Constrained Density Estimation via Optimal Transport