Will a fan that is compatible with a pentium D be compatible with a core 2 duo?
All heatsink/fan combo (HSF) that are compatible with the socket 775 would be compatible with another chip using the same socket.
So yes, it would be "compatible", in the sense that it would fit.
However, there is still the problem of thermal dissipation.... However, you're lucky in the sense that Pentium Ds probably have a higher thermal dissipation requirement than Core2Duos, so any HSF should work.
Of course, I had to assume you mean HSFs, cos any fan from any PC will be compatible with any other PC if its the same size.