Yes ! Say you have loss_1 and loss_2 (computed for example with x[:, 0] and x[:, 1]).
Then if you call .backward() on a combination of the two losses, for example
loss_sum = 0.5 * loss_1 + 0.5 * loss_2
loss_sum.backward()

optimization can happen properly.