Can I use the mosfet for 5 volt to 3.3 volt logic converter
Google MOSFET level shifter. You need to pullup to +5 to get 5V at the output. 

edit: Here is the first hit: 



It should be obvious that the way you have the MOSFET won't work (just look at the substrate diode- it will conduct with +5 on the left side). 

The turn on voltage of the BSS138 is a bit on the marginal side, but probably good enough for your purposes.