You get a 500 error because you have created an infinite loop.
Explanation: (when trailing slash is made optional)
domain.com/page_name/ is rewritten to /?page=page_name /?page=page_name means /index.php?page=page_name - but now your rule matches
index.php too - --> LOOP
To avoid it, you can use this code instead
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]+)/?$ /?page=$1 [L]
This code checks if request URI is not an existing file/folder before rewritting.
Your rule could do the trick only if you don't make trailing slash optional.
RewriteRule ^([^/]+)/$ /?page=$1 [L]
And it would be a better idea since you won't have duplicate content (2 different urls -with/without trailing slash- giving same content: bad for search engines).
Conclusion: choose one format but not both. If you choose without trailing slash format then you can use my first part of code (you can remove ?). Otherwise, you can choose my second (the one looking almost the same as yours).
Note: you don't need to escape / with mod_rewrite
RewriteRule ^([^/]*)(?:\/)?$ /?page=$1 [L]is what you want.