You can, and you absolutely should! Keeping your brain safe is way more important than keeping your hair perfect!
Wearing a helmet will not hurt your locks. The locks themselves may be a little flat after you take the helmet off, but they will poof back up after you wash them. You may need to get a larger helmet, because the helmet that fit your unlocked hair may become too snug after you start your locks.
If there is velcro exposed anywhere in your helmet, you should attempt to cover it up with tape or another strip of Velcro. Exposed Velcro is the archenemy of locks, and one unfortunate exposure to it will make you learn the hard way.