Using optical Ramsey interferometry, we precisely measure the laser-induced ac-Stark shift on the S(1/2)-D(5/2) "quantum bit" transition near 729 nm in a single trapped 40Ca+ ion. We cancel this shift using an additional laser field. This technique is of particular importance for the implementation of quantum information processing with cold trapped ions. As a simple application we measure the atomic phase evolution during a n x 2 pi rotation of the quantum bit.