Lattice covering time in D dimensions: theory and mean field approximation