You use 公園を散歩する。It is grammatically incorrect to say 公園で散歩をする。
Which feels weird since you usually say で when you do an activity at a place. Like 学校で勉強する or レストランで働いている。
But under following circumstances, it is correct to use を instead of で:
If it is a place that you go through. 公園のなかを走る。大通りを歩く。
If it is a place that aparts from other places. 船が港を離れる。10時にうちを出る。
If you use following verbs. 訪ねる 訪れる 訪問する
Ex. 村の歴史をよく知っている老人を訪ねる。
友人のおみまいで病院を訪れる。
先生の研究室を訪問する。
Good luck and please ask if you did not understand what I meant or if you want to know anything else ^_^