2.2k is safe. But with an 8 Ohm speaker, I'm not sure you'll hear anything.* A piezo speaker (higher impedance) should be OK.

The Due web page says:

They operate at 3.3 volts. Each pin can provide (source) a current of 3 mA or 15 mA, depending on the pin, or receive (sink) a current of 6 mA or 9 mA, depending on the pin.

If we take the worst case (3mA limit) and apply

Ohm's Law, we get 3.3V/0.003A =

1100 Ohms minimum. (Resistance means resistance to current flow and if we increase resistance we decrease current.) If you use a pin rated for 15mA (I don't know which one that is) and wire it correctly (to "source" the current) you can go down to 220 Ohms.

Resistances in series are added. So with an 2.2k Ohm resister and an 8 Ohm speaker, you actually have 2208 Ohms. But, the speaker is insignificant in this situation.

* The resistor and speaker in series form a voltage divider with the voltage divided proportionately. With an 8 Ohm speaker an 2.2k, you have 8/(2208) x 3.3 = 12millivolts (peak) across the speaker.