No you are not able to apply for permanent residence just because you will have a child born in the US.  You would have to get married to your girlfriend and, assuming she is a US citizen, she would be able to petition for your permanent residence on the basis of marriage.  Otherwise, if you are not going to get married, you can remain in your M-1 status or seek permanent residence through employment at some future date.