The temperature dependence of the ab-plane optical reflectivity of Ba(Fe0.92Co0.08)2As2 and Ba(Fe0.95Ni0.05)2As2 single crystals is measured in a wide spectral range. Upon entering the superconducting regime, the reflectivity in both compounds increases considerably at low frequency, leading to a clear gap in the optical conductivity below 100 cm−1. From the analysis of the complex conductivity spectra we obtain the penetration depth λ(T)=(3500±350) Åfor Ba(Fe0.92Co0.08)2As2 and (3000±300) Åfor Ba(Fe0.95Ni0.05)2As2. The calculated superfluid density ρs of both compounds nicely fits the scaling relation ρs=(125±25)σdcTc.