The Dirichlet problem for a class of ultraparabolic equation