Yes, it's Constitutional. Article II, Section 1:
Each State shall appoint, in such Manner as the Legislature thereof may direct, a Number of Electors, equal to the whole Number of Senators and Representatives to which the State may be entitled in the Congress
If the Massachusetts is stupid enough to allow voters in the rest of the country to choose their electors for them, then by all means let them. That means in 2004, Massachusetts electors would have voted for Bush. In 1988, they would have voted for Bush Sr. over their homeboy Dukakis. And in 2012, they will be voting Republican, regardless of how Massachusetts voters decide.
They will just change the law if that happens.