Yes you can, but only via a glitch.
First you get on your bike and find a berry tree next to a wall. Then while on the bike, shake the tree until a Pokémon comes out. You will then be inside the tree. Then wait for the berries to grow back (this may take a day or two) face away from the wall, and shake the tree again. Then you can walk through the wall!
Source: Out of Bounds glitch
Hope I helped!