You can use a null transaction argument to the following variant of the Queue.add method.
add(Transaction txn, TaskOptions taskOptions)
This is explained at the top of the Queue interface documentation. It will make adding the tasks independent to the success or failure of an active transaction.
However, if you really don't care about queueing the tasks even if the transaction fails, you could create the TaskOptions objects in a list within the transaction and then enqueue them in one call after the transaction completes. That way, you will not incur the latency costs of adding to the queue inside your transaction.