We present results for the renormalization constants of bilinear quark operators obtained by using the tree-level Symanzik improved gauge action and the N f = 2 twisted mass fermion action at maximal twist, which guarantees automatic O(a)-improvement. Our results are also relevant for the corresponding standard (un-twisted) Wilson fermionic action since the two actions only differ, in the massless limit, by a chiral rotation of the quark fields. The scale-independent renormalization constants Z V, Z A and the ratio Z P /Z S have been computed using the RI-MOMapproach, as well as other alternative methods. For Z A and Z P /Z S, the latter are based on both standard twisted mass and Osterwalder-Seiler fermions, while for Z V a Ward Identity has been used. The quark field renormalization constant Z q and the scale dependent renormalization constants Z S, Z P and Z T are determined in the RI-MOM scheme. Leading discretization effects of O(g 2a 2), evaluated in one-loop perturbation theory, are explicitly subtracted from the RI-MOM estimates