Did you get a State fund mortgage? Did you get a grant?
Call the Servicer of your mortgage. Also, read all the documentation signed at closing. Call the agent, if any, you worked with and the Home mortgage Consultant and ask if your Mortgage has a Prepay Penalty.
Please answer those questions for better answers in Trulia.com.
You ask, "Is there a penalty for selling your house within the first year of ownership in Massachusetts?"
Massachusetts does not assess a penalty on resale of a property, however you may find that certain mortgage providers will. Meaning that the Commonwealth allows you do do as you will, but often lenders will have a penalty if you sell the home (retire the note) in the first 3 years. They feel that they have not made the profits they are entitles to until you have been paying them for 3 years, so if you sell early you'll owe them the money they didn't collect.
Also, there is an unwritten penalty you will withstand for selling quickly. You will have a hard time (in this market) recouping the money you spent on a house you bought only last year. And beyond that, you will have the expense of closing costs and probably the commission you would have to pay to a Realtor or Lawyer for assisting in the transaction. If you hold the property longer you will have similar expenses, but to opportunity for appreciation in the home value would be much greater.
But if you have to sell, then sell knowing the State will not penalize you...