Is it possible to use the batch API with transactions?
I'm afraid not. 
Batch API divides task into separate steps, each in it's own PHP call. In pure PHP (for simplicity) you use transactions like that:

try {
    // First of all, let's begin a transaction
    $db-&gt;beginTransaction();

    // A set of queries; if one fails, an exception should be thrown
    $db-&gt;query('first query');
    $db-&gt;query('second query');
    $db-&gt;query('third query');

    // If we arrive here, it means that no exception was thrown
    // i.e. no query has failed, and we can commit the transaction
    $db-&gt;commit();
} catch (Exception $e) {
    // An exception has been thrown
    // We must rollback the transaction
    $db-&gt;rollback();
}


To split it into multiple calls, you would need to store PDO object and pass it between calls, but PDO objects cannot be serialized.

Workaround would be to import to a temporary table, and when (if) it was successful, use one more batch api step to move data from temporary one to real destination. And that one last move you can do in one step, so you can wrap it with transaction.