Do electric motors have the same efficiency when operating as generators?
The efficiency of a DC machine will be similar whether working as a motor or as a generator.

Why not identical?

Another way of expressing efficiency is the power loss of the machine. The main power losses are ...

a) \$I^2 R\$ losses in the copper windings
b) Wind resistance between rotor and stator, and friction in the bearings
c) There will be a bunch of other losses, eddy currents, noise, vibration

When running as a motor, the (a) losses will increase the input terminal voltage, and (b) will reduce the output torque. When running as a generator, (b) increases the torque needed, and (a) reduces the output voltage. 

The machine is never running under exactly the same conditions, the mechanical power and electrical power are never equal (the input always exceeds the output). So if you want to define efficiency at a particular power point, or speed, or torque, they will always be slightly different for motoring or generating. But similar.