Change the icon of the folder you want to pin before you pin it.
OR/
Right-click the icon on the taskbar and then right-click the folder on that menu and select properties.
On the resulting dialog, select Change Icon and browse to the icon you want to use.
NOTE: You might have to restart Explorer for the change to take effect.