Electromagnetic form factor of the pion from twisted-mass lattice QCD at N-f=2