I'm using R, but the density function requires the actual samples, but I only have the histogram data. Can I still use kernel density estimation, or is there a better tool for this?
Beyond the specific implementation question, I am not sure to understand how you would go about it. In a sense, an histogram is already a sort of “smoother”. You could make it look a little more “curved” but much information has already been lost and the artifacts created by the bins' location and width cannot be reversed without strong assumptions.
Kernel density estimation in the most common forms requires the raw data. Your problem seems more on the line of finite volume methods. However it can also be approached in a simpler way in the "spirit" of KDE. Set up a parametric basis of (smooth) "kernels" centered at each bin, e.g. 3 bins wide so that the 2 neighbours are covered in each case. Then build a system of equations representing the N constraints given by the histogram bins counts. These can be expressed as the integral of the parametric PDF over each bin. So you get a system of linear equations. It will be underdetermined because of missing boundary conditions, which you might want to impose additionally or trade for other constraints.
I would not call these "strong" assumptions (although they imply a little bias, but so do histograms already), and even though some information had been lost by binning there is still enough to improve on plain histograms. Note that because of that information loss the solution that you'll obtain will be worse than just using the same parametric basis on the raw data.