You can specify the fill opacity separately form the draw opacity. In the first example below I used opacity and in the second I used fill opacity which will only affect the fill and not the draw.

Note:
- As pointed out by Martin Scharrer: Specifying
\opacity=<x> affects both the fill and draw so is equivalent to saying fill opacity=<X>, draw opacity=<X>.
fill opacity applies not only to the fill, but also applies to text. To override this behavior, you can separately set the text opacity which applies only to the text labels.
Code:
\documentclass[border=3pt]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw [ultra thick, draw=black, fill=yellow, opacity=0.2]
(0,0) -- (0,1) -- (1,1) -- cycle;
\end{tikzpicture}
\begin{tikzpicture}
\draw [ultra thick, draw=black, fill=yellow, fill opacity=0.2]
(0,0) -- (0,1) -- (1,1) -- cycle;
\end{tikzpicture}
\end{document}