We analyze time-resolved spontaneous emission from excitons confined in self-assembled InAs quantum dots placed at various distances to a semiconductor-air interface. The modification of the local density of optical states due to the proximity of the interface enables unambiguous determination of the radiative and non-radiative decay rates of the excitons. From measurements at various emission energies we obtain the frequency dependence of the radiative decay rate, which is only revealed due to the separation of the radiative and non-radiative parts. It contains detailed information about the dependence of the exciton wavefunction on quantum dot size. The experimental results are compared to the quantum optics theory of a solid state emitter in an inhomogeneous environment. Using this model, we extract the frequency dependence of the overlap between the electron and hole wavefunctions. We furthermore discuss three models of quantum dot strain and compare the measured wavefunction overlap to these models. The observed frequency dependence of the wavefunction overlap can be understood qualitatively in terms of the different compressibility of electrons and holes originating from their different effective masses.