Does rate of acceleration affect the amount of energy used to accelerate? Assume you start with a car at rest. Then you accelerate the car to 100 kilometers per hour. In terms of the energy needed, does it matter how fast you accelerated the car? 
In other words, do you need to provide the same amount of energy to accelerate a car from 0 to 100 kilometers per hour whether you do it in 4 seconds or 20 seconds? 
 A: 
Does rate of acceleration affect the amount of energy used to
  accelerate?

The answer is, in a certain sense, no.
But, really, your question as worded is ambiguous.  What does "energy used to accelerate" actually mean?
There is an energy associated with a change in speed which is precisely the change in kinetic energy:
$$\Delta KE = \dfrac{m}{2}(v^2_f - v^2_i)$$
Now, since it is net force that accelerates an object, then, if "energy used to accelerate" means "net force over distance to change speed from $v_i$ to $v_f$", then, in this sense, the answer to your question is no.
However, the applied force may not be the net force on the object as there may be, e.g., a frictional force.
So, if "energy used to accelerate" means "applied force over distance to change speed from $v_i$ to $v_f$", then the answer to your question is yes.

In other words, do you need to provide the same amount of energy to
  accelerate a car from 0 to 100 kilometers per hour whether you do it
  in 4 seconds or 20 seconds?

If it's a real car, there is energy associated with simply maintaining a non-zero speed so, again, it depends on what you mean by "energy to accelerate a care".  Do you mean "energy above and beyond that which is required to overcome the losses" or something else?
A: This answer ignores the effects of dissipative forces like friction and air resistance.  

You're confusing power with energy
The total energy of the car is the sum of its kinetic and potential energies. This, of course, ignores internal energy, etc, which remain constant for the car during the time we care about it.
The energy of the car is 
\begin{equation}
E = \text{Kinetic} + \text{Potential}\\
E = \frac{1}{2}mv^2 + mgh
\end{equation}
Initially, the car will have 0 kinetic energy (since its velocity is zero) and some potential energy $P_1=mgh_1$
\begin{equation}
E_1 = mgh_1
\end{equation}
After it is accelerated,
\begin{equation}
E_2 = \frac{1}{2}m(100km/h)^2 + mgh_2
\end{equation}
The energy needed is:
\begin{equation}
\Delta E = E_2 - E_1 = \frac{1}{2}m(100km/hr)^2 + mg(h_2 - h_1)
\end{equation}
Notice that none of this depends on the time taken, only on the initial and final velocities and heights.
The power supplied, however, is the work done (or energy supplied) per unit time.
Conclusion:
Energy needed is independent of time.
Power required is greater if you do it in 4 seconds than if you do it in 20 seconds
A: One thing you might want to consider. Even if it takes the same energy to accelerate slow vs. fast, if you are ultimately traveling the same distance, then because you got to the faster speed more quickly you will use more energy to cover that distance.
For example.  If you are trying to get to 100kph and you plan to travel a total distance of 1km, you now have 2 cases:
a) In the first case you get to 100kph in 4 seconds, then travel the remaining 1km at 100kph.
b) in the second case you get to 100kph in 20 seconds, then travel the remaining 1km at 100kph
Then in case "a" you will be traveling 100kph for 16 seconds longer than in case "b". Of course if you are in stop & start traffic, and hit that accelerator a lot, then you will experience a significant difference in energy use.
A: First of all as you go from 0 kmph to 100 kmph in either 4 or 20 seconds there is rate of speed/velocity only, we are not talking about rate lf acceleration here. 
Now we can see that in both cases the acceleration would be different; had we been living in an ideal world it wouled not have mattered, but as accelerations are different so would be required forces for said accelerations, these forces even in absense of air would have to overcime friction and therefore heat losses, these lossss would be related to acceleration and hence acheiving same speed in different time would require different energies.
A: Basic physics. 
(1) W = F * s where W is work (energy), F is force and s is distance.
(2) F = m * a where m is mass and a is acceleration.
substitute F in equation (1) with equation (2) and you get (3) W = m * a * s.
From equation (3) assuming  mass and distance are constants, then Work is directly proportional to acceleration. An increase in acceleration means in increase in energy.  
