Transmission electron energy loss spectroscopy was used to obtain local dielectric properties in barium titanate. The high frequency dielectric function of the material was studied dynamically during the cubic-to-tetragonal (c --> t) phase transformation in conjunction with the effect of a small amount (0.9%) of donor dopant (niobium). In order to obtain the local dielectric function during the phase transformation, Kramers-Kronig relations were applied to the energy loss measurements. The optical excitations in the energy loss spectra were consistent with band structure results from the literature, The Re (1/epsilon), real part of the inverse dielectric function, obtained from the energy loss data indicated a change at the phase transformation. Specifically, a broadening of the valence plasmon excitation is observed which is attributed to the order-disorder nature of the t --> c transformation. A 0.4 eV shift in the volume plasmon was observed in the Nb-doped sample in all regions (within grains as well as at grain boundaries), indicating a uniform incorporation of the dopant in the lattice, In this paper, the changes in the dielectric function, such as shifts in collective excitations, are attributed to a large contribution from loosely bound Nb electrons. Furthermore, it is demonstrated that it is possible to obtain local (approximate to 10 nm) physical property of a complex material dynamically at relatively high temperature.