The Dirichlet problem for a class of elliptic difference equations