Yes you may. While you were living and working in Massachusetts, California does not consider the income to be "California-sourced". You may claim that income exclusively to Massachusetts. Of course, once you move to California, all of your income is taxed in California from that point forward. You will file part-year returns to both states to split this income between the two.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"