This is dependant on the type of loan you received and if you signed a statement that you would use the home as your primary residence. Typically, all lenders have you sign this statement which means that you would need to get with the lender and ask them. If you received an FHA or VA loan, the answer will be "No". You "might" be able to get a conventional lender to allow this. Now, if you are renting out a portion of the property, then you will be ok because you will still be living there.
Hope that helps.
Terrence Charest, e-Pro