Basically, there are a couple of options:
1. Your method, which is to remember the _id of the batch and query them back. Depending on the size of the batch, this may not be as bad as it sounds, for 2 reasons: _id is indexed, and the default BSON Object id increases in time, which would mean that the batch documents will most likely be very close to each other in the b-tree. To make this really fast, you can limit the result to only return the _id field so the query can use a covered index.
2. Decompose the batch into individual inserts and call getLastError every time. I would imagine that this would be slower than 1, since you get more back and forth traffic.