There are few ways to create theorem like environments. Here's an option using ntheorem

The trick is to make a new theoremstyle using the arguments
##1 which is the name of the theorem
##2 which is the number of the theorem
##3 which is the optional title of the theorem
Using the examples in the ntheorem documentation as a guide, you can tweak this to suit your needs.
\documentclass{article}
\usepackage{lipsum}
\usepackage{ntheorem}
\makeatletter
\newtheoremstyle{numberfirst}%
{\item[\theorem@headerfont{##2\theorem@separator\hskip\labelsep ##1}]}%
{\item[\theorem@headerfont{##2\theorem@separator\hskip\labelsep ##1} (##3)]}%
\makeatother
\theoremstyle{numberfirst}
\theoremseparator{.}
\newtheorem{mytheorem}{Theorem}
\begin{document}
\begin{mytheorem}
\lipsum[1]
\end{mytheorem}
\begin{mytheorem}[Optional title]
\lipsum[1]
\end{mytheorem}
\end{document}
theoremandexampleenvironments at the moment - using a package or not? If you're using any package, please provide this information as well, since there are many packages available for definingtheorem(or other) environments, each of which might require a specific solution. – Werner Feb 10 '12 at 17:58