The Dalitz decays eta -> e^+e^-g and omega -> pi^0 e^+e^- have been measured in the g p -> eta p and g p -> omega p reactions, respectively, with the A2 tagged-photon facility at the Mainz Microtron, MAMI. The value obtained for the slope parameter of the electromagnetic transition form factor of eta, Lambda^{-2}_eta=(1.97+/-0.11_tot) GeV^{-2}, is in good agreement with previous measurements of the eta -> e^+e^-g and eta -> mu^+mu^-g decays. The uncertainty obtained in the value of Lambda^{-2}_eta is lower than in previous results based on the eta -> e^+e^-g decay. The value obtained for the omega slope parameter, Lambda^{-2}_omega_pi^0 = (1.99+/-0.21_tot) GeV^{-2}, is somewhat lower than previous measurements based on omega -> pi^0 mu^+mu^-, but the results for the omega transition form factor are in better agreement with theoretical calculations, compared to earlier experiments.