When your i-485 is pending, i believe you are still holding F1 status. Then you should be able to use 1040NREZ, otherwise, 1040 is the form to use. Do check with your immigration lawyer and the tax expert though.