We demonstrate efficient transfer of ultracold molecules into a deeply bound rovibrational level of the singlet ground state potential in the presence of an optical lattice. The overall molecule creation efficiency is 25%, and the transfer efficiency to the rovibrational level vertical bar v = 73, J = 2 textgreater is above 80%. We find that the molecules in vertical bar v = 73, J = 2 textgreater are trapped in the optical lattice, and that the lifetime in the lattice is limited by optical excitation by the lattice light. The molecule trapping time for a lattice depth of 15 atomic recoil energies is about 20 ms. We determine the trapping frequency by the lattice phase and amplitude modulation technique. It will now be possible to transfer the molecules to the rovibrational ground state vertical bar v = 0, J = 0 textgreater in the presence of the optical lattice.