Once per turn when you hit a creature with your pact weapon, you can
expend a warlock spell slot to deal an extra 1d8 force damage to the
target, plus another 1d8 per level of the spell slot, and you can
knock the target prone if it is Huge or smaller.
Since it says "can knock the target prone." I assumed it was optional, (though you wouldn't have much reason not to if in melee, within 5 ft.)
Best Answer
Knocking the target prone is optional.
You have understood the feature correctly. "Can" indicates that you are able to, but does not indicate that you are compelled to.
If the prone-knocking were not optional, it would read something like:
This is similar to the language used in many features which knock targets prone. For example, the spell destructive wave (PHB, pg. 231) says:
The spell description states what happens - targets are knocked prone when they fail the save, and it is not optional.