A tiling puzzle

Here are four magic triominoes:

Four magic triominoes, colored alternating red and blue

Four magic triominoes

Each is made out of three squares, two red and one blue or two blue and one red, alternating in color. These squares have the following property: if you place two squares of the same color on top of each other, they stack. On the other hand, if you place a red square on top of a blue square, they annihilate each other.

For example, if you place the following two triominoes, so that the rightmost square of the first aligns with the bottom square of the second, you get the following configuration:

Placing squares of opposing colors on top of each other annihilates them

Placing two triominoes so that squares of opposite colors are on top of each other annihilates those squares.

But if you place the same two triominoes so that the middle square of the first aligns with the bottom square of the second, those two red squares stack, which I’ve indicated by a two below (i.e. there is a stack of height two at that location):

Aligning squares of the same color causes them to stack

Your goal is: given an N x M chessboard of squares, place these triominoes onto the chessboard so that every square is covered by exactly one red tile. (Note that the tiles aren’t allowed to stick off the edge of the board.)

For which (N,M) is this possible (with proof)? Feel free to post solutions in comments; if no one posts a solution in a week or so I’ll update with a solution.