D-meson lifetimes within the heavy quark expansion