You have 7 months (plus maybe an additional paycheck) until the end of the year.
You're young, so the max 401k is around $17,000. (Best to double-check the exact amount as it changes every so often).
With $4,000 per month to invest, you need 4 months pay plus $1,000 to maximize the 401k. You have until the end of the year to do so.
If you go the 401k route, consider filling it up at $4000 a month starting in mid-August. That gives you Jun, July, 1/2 August and maybe the end-of-May paycheck to use for paying down the 6.8% student loan. You would pretty much finish if off by then.
That would give you the student loan payment per month to do additional debt payment or investing with from then on, also.
HR will freak, of course. Just remember to re-set it to a lower amount in time for your first January paycheck. (Although I've seen posting from folks who max the 401k at the first of the year to maximize the time the money is growing in the non-taxable 401k environment.
Personally, it's been my experience that great, hard-working folks can still get laid off when the folks running the company screw up badly enough, and that there's often no warning that things are amiss. Management tries to hide that info from folks. That's why I like to minimize my debt - particularly the kind of debt like student loans that can't be discharged via bankruptcy.