Japanese traffic laws also apply to bicycles. The cop was perfectly right to stop you for no light and could have issued you a ticket if he had wanted to.
If you're going to operate a vehicle here, obey the laws and you'll spend a lot less time talking to policemen.