this post will show you how to enable the black 2d dock in osx lion and mountain lion
defaults write com.apple.dock no-glass -boolean YES killall Dock
to get back to the 3d dock
defaults write com.apple.dock no-glass -boolean NO killall Dock
the 3d dock only shows if the dock is at the bottom of the screen – if you have the dock set to the left or right then it will change to 2d automatically
update: thanks to Nigel for pointing out a mistake with the disable instruction!