Can I use a DC SSR that is switched by a PID controller to control the speed of a 12 V DC fan?
Why do you think you need a solid state relay (SSR)?  Unless you need isolation, and it doesn't sound like it, this is the wrong way to switch the fan.

Assuming the fan can be directly connected to the circuit that is doing the temperature control (doesn't need to be isolated), then it will be simplest to control it via PWM with a transistor as a low side switch.

Just about any microcontroller nowadays has PWM output capability.  Even if not, a fan will be so slow to respond that the PWM could be done totally in firmware from a periodic interrupt or something.  In any case, the PWM duty cycle gives you smooth control over the fan drive level.  The PID controller then adjusts that to maintain the desired temperature.

A simple circuit to control the fan from a digital output of a microcontroller is:



You didn't give any characteristis of the fan, so this exact circuit might not be appropriate.  This will work for a fan that needs up to a couple of amps or so, which is a lot for a typical 12V muffin fan.  A NPN transistor could have been used but would require a little different drive circuitry.  The advantage of this NFET is that it can be directly connected to the output of 5V CMOS logic.