We present a model describing the dynamics of a flexible linear polymer in a monodisperse melt. The polymer is represented by a freely jointed chain that moves by two coupled dynamical processes. The first is a kink-jump motion that may be blocked by obstacles, and the second is a slithering motion that mimics reptation. The obstacles relax with a distribution of time scales. This distribution is determined self-consistently by the requirement that it be identical to a distribution of time scales associated with the relaxation of the slowest internal modes of the chain. The calculation of observables is shown to be equivalent to the solution of a random walk problem with dynamical disorder. We determine this solution by applying the dynamical effective medium approximation. Within the resulting theory, the mean squared displacement of a polymer bead on any time scale may be determined by solving a fifth order algebraic equation and inverting a Laplace transform. We present calculations of the self-diffusion coefficient in a melt and of the tracer diffusion coefficient of a chain of a given molecular weight at infinite dilution in a melt of another molecular weight. For the self-diffusion coefficient, the theory predicts results consistent with the Rouse model for short chains and behavior consistent with the reptation picture for long chains. The crossover between these limiting behaviors is described. Comparison is made to measurements of tracer and self-diffusion in polystyrene melts.