You could use pgf for this. It has a \pgfmathsetbasenumberlength setting used for the base conversion macros. Setting it to 2 and do a dummy conversion the counter value to base 10 will give you 01, 02, ..., 10, etc. It also scales well, i.e. you can just use 3 and get 001, etc. However, for smaller things I would use egreg's solution instead.
\documentclass{article}
\usepackage{pgf}
\newcounter{mycounter}
\newcommand\test{{%
\pgfmathsetbasenumberlength{2}% try 3, 4, ...
\pgfmathbasetodec\testvalue{\the\value{mycounter}}{10}%
\testvalue
\stepcounter{mycounter}%
}}
\begin{document}
\test
\test
\test
\test
\test
\test
\test
\test
\test
\test
\test
\end{document}
Please also see the PGF manual section 66 Number Printing which should also be interesting for you.