Hi there! you can feed him fish food temporarily. but you will need betta food very soon. Bettas are carnivores and most fish foods do not fulfill the nutritions bettas need. normal fish food may cause bloat an nutrition deficiency.
That said, he will need proper housing. if you read the faq tab at the top of the page, there are some very good info there for you.
you can keep betta in 1gallon tanks. but those tend to be generally harder upkeep. in a small tank ( less than 5g). id recommended to do two water changes weekly.
50% half weekly and 100% at the end of the week. you will have to be very diligent about this and not miss water changes. Since the ammonia build up in tanks those size occurrs swiftly.
A 5g+ tank with a filter (make sure the itake is safe for fish) can be cycled, have a 10-20% weekly water change and is a much more stable environment for the fish.
Live plants will also help water quality.
About the betta diet. A good betta food is recommended. The cheapest good one should be hikari's biogold. They recently changed their recipe to have meat as the first ingredient. However, variety is key. once every week you should feed your betta frozen foods or bloodworms or a very clean tiny piece of cooked shrimp(just plain shrimp nothing added) . Give him a piece the size of two expanded pellets instead of his regular food. :)