We consider a single electron confined within a quantum wire in a system of two electrostaticallyinduced QDs defined by nearby gates. The time-varying electric field, of single GHz frequency, perpendicular to the quantum wire, is used to induce the Rashba coupling and enable spin-dependent resonant tunneling of the electron between two adjacent potential wells with fidelity over 99.5 %. This effect can be used for the high fidelity all-electrical electron-spin initialization or readout in the spin-based quantum computer. In contrast to other spin initialization methods, our technique can be performed adiabatically without increase in the energy of the electron. Our simulations are supported by a realistic self-consistent time-dependent Poisson-Schroedinger calculations.