Calculation of optical properties within the local density approximation to density functional theory: application to palladium