We study the position distribution P(R[over ⃗],N) of a run-and-tumble particle (RTP) in arbitrary dimension d, after N runs. We assume that the constant speed v>0 of the particle during each running phase is independently drawn from a probability distribution W(v) and that the direction of the particle is chosen isotropically after each tumbling. The position distribution is clearly isotropic, P(R[over ⃗],N)→P(R,N) where R=|R[over ⃗]|. We show that, under certain conditions on d and W(v) and for large N, a condensation transition occurs at some critical value of R=R_{c}∼O(N) located in the large-deviation regime of P(R,N). For R<R_{c} (subcritical fluid phase), all runs are roughly of the same size in a typical trajectory. In contrast, an RTP trajectory with R>R_{c} is typically dominated by a "condensate," i.e., a large single run that subsumes a finite fraction of the total displacement (supercritical condensed phase). Focusing on the family of speed distributions W(v)=α(1-v/v_{0})^{α-1}/v_{0}, parametrized by α>0, we show that, for large N,P(R,N)∼exp[-Nψ_{d,α}(R/N)], and we compute exactly the rate function ψ_{d,α}(z) for any d and α. We show that the transition manifests itself as a singularity of this rate function at R=R_{c} and that its order depends continuously on d and α. We also compute the distribution of the condensate size for R>R_{c}. Finally, we study the model when the total duration T of the RTP, instead of the total number of runs, is fixed. Our analytical predictions are confirmed by numerical simulations, performed using a constrained Markov chain Monte Carlo technique, with precision ∼10^{-100}.