On the Dirichlet problem for Monge-Ampere type equations