possibly not. voltage might be the same, but it depends on what sort of batteries are being charged
different battery types have different charge cycles, some like a steady trickle of current for several hours, some like a big whack of current for a short while then tail off to a trickle for a bit to finish off
NiMh batteries won't be happy with a nicad charger and vice versa, lead acid batteries, aren't too fussy but can demand a huge amount of current to get the started
too much current being pulled from the charger can nack the charger
too much current being forced on batteries that aren't wanting it can nack the batteries
Thats not to say all you won't get away with it, you might, but if its not what the batteries are after, whilst it might charge them it might shorten their life as well
generally speaking, if the charger was designed for nicads, and the lamp has nicads, you should be ok, same if its charger for lead acids and the batteries are lead acids, ditto NiMh
Lithium batteries can be the fussiest of all