In this paper we give a construction of T-shift synchronization codes, i.e. block codes capable of correcting synchronization shifts of length at most T in either direction (left or right). We prove lower and upper bounds on the maximal cardinality of such codes. An infinite number of the constructed codes turn out to be asymptotically optimal.