A quick recipe:
(require 'dired-x)
(setq dired-omit-files "^\\...+$")
(add-hook 'dired-mode-hook (lambda () (dired-omit-mode 1)))
You can then toggle the view with dired-omit-mode (M-o by default).
Read the manual of dired-x for more details.