Basis for ultrafast imaging of molecular orbitals with high-order harmonic generation