Of course you can 🙂
Just check one of the example my-???? files in the MySQL root installation folder to check where it should be.
Example:
[mysqld]
....
set-variable = key_buffer=384M
set-variable = max_allowed_packet=2M
set-variable = table_cache=512
set-variable = sort_buffer=2M
set-variable = record_buffer=2M
set-variable = thread_cache=8
Try number of CPU's*2 for thread_concurrency
set-variable = thread_concurrency=8
set-variable = myisam_sort_buffer_size=64M
.....
The other parameters might be also useful but you must adjust them to values according to the amount of RAM in your server.
But don't forget the [mysqld] tag. The my.ini file has to be in the windows or winnt folder.