Drive is a verb. Safely is an adverb. It modifies a verb, a noun or another adverb. I don't know if safe works. I can't get my head around what part of speech is safe now.
Not all languages distinguish between adjectives and adverbs the way English does. Also, it seems to me that the distinction between some adjective and adverb forms (such as "safe" and "safely") has weakened over the past few decades, at least in common everyday usage.
That's probably a generational thing. We old birds who had Mrs. McClure for 8th-grade English (or whomever was the equivalent in your schooling) weren't allowed to say or write "drive safe" without an admonishment. But damn kids these days ain't taught proper...ly....
1. operate and control the direction and speed of a motor vehicle: "he got into his car and drove off"synonymsoperate, pilot, steer, handle, manage, ... moreguide, direct, navigate, travel by car, go by car, motor, informal:travel on wheels, tool along, bowl along, spinantonymswalk
▪ (of a motor vehicle) travel under the control of a driver: "a car drives up, and a man gets out"
▪ own or use (a specified type of motor vehicle): "Sue drives an old Chevy"
▪ be licensed or competent to drive a motor vehicle: "I take it you can drive?"
▪ bore (a tunnel): "an engineer suggested driving a tunnel through the Judean hills"
▪ (in ball games) hit or kick (the ball) hard with a free swing of the bat, racket, or foot.
▪ strike (a ball) from the tee, typically with a driver: "I'm driving the ball really well and my irons are good"
3. urge or force (animals or people) to move in a specified direction: "they drove a flock of sheep through the center of the city"synonymsimpel, urge, press, move, get going, ... moreherd, roundup, shepherd
▪ compel to leave: "troops drove out the demonstrators"
▪ a short road leading from a public road to a house or other building: "from the window he could see right down the weedy drive to the front gate"synonymsdriveway, approach, access road, road, roadway, ... moreavenue
2. an innate, biologically determined urge to attain a goal or satisfy a need: "emotional and sexual drives"synonymsurge, appetite, desire, need, impulse, ... more
I would use "drive safely" because that was correct grammar when I was growing up - and I believe it still is.
But "drive safe" has become such a common colloquialism that it seems to have become accepted usage.
I found this on Quora (which is often right but not always): 'Safe' is an adjective, a noun and an adverb. Safe, when it's used as an adverb, is referred to as a flat adverb. (It's an adverb that has the same form as its related adjective.) (Hence, 'arrived safe' and 'arrived safely' are both correct.
Who cares? Say either one to me and you will get a sarcastic reply. Why do people think I have to be told how to drive? I don't know why this irks me so much, but it does.