We investigate the statistics of the local time T=∫_{0}^{T}δ(x(t))dt that a run and tumble particle (RTP) x(t) in one dimension spends at the origin, with or without an external drift. By relating the local time to the number of times the RTP crosses the origin, we find that the local time distribution P(T) satisfies the large deviation principle P(T)∼e^{-TI(T/T)} in the large observation time limit T→∞. Remarkably, we find that in the presence of drift the rate function I(ρ) is nonanalytic: we interpret its singularity as a dynamical phase transition of first order. We then extend these results by studying the statistics of the amount of time R that the RTP spends inside a finite interval (i.e., the occupation time), with qualitatively similar results. In particular, this yields the long-time decay rate of the probability P(R=T) that the particle does not exit the interval up to time T. We find that the conditional end-point distribution exhibits an interesting change of behavior from unimodal to bimodal as a function of the size of the interval. To study the occupation time statistics, we extend the Donsker-Varadhan large-deviation formalism to the case of RTPs, for general dynamical observables and possibly in the presence of an external potential.