You can charge it.
It gets charged by the bike`s charging system,dunnit ?
The secret is checking its charging rate and not exceeding it.
Check also if it`s a gel or AGM battery as they need a lower rate than normal and sometimes a 'rest' period too.
An Optimate will defo be okay (especially the later versions).
An old style 'car battery charger' or 'power pack' probably won`t be.