Using a first-principles approach, we investigate the influence of fluorine doping on the electronic structure, lattice dynamics, and electron-phonon coupling in LaFeAsO. In order to explore properties which are not described by the virtual crystal approximation, we explicitly simulate the F doping using a supercell model. Our analysis reveals that the relaxation of the crystal lattice around the dopant modifies the lattice dynamics in agreement with recent experimental data. In addition, we find that the doped electronic charge does not localize on the two-dimensional Fe plane. The net charge variation in this plane upon doping corresponds instead to a slight hole doping.